#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<malloc.h>
//struct s
//{
//	int n;
//	int arr[];
//};
//
//int main()
//{
//	struct s *w = (struct s*)malloc(sizeof(struct s)+10*sizeof(int));
//	w->n = 100;
//	struct s*wtr= (struct s*)realloc(w, sizeof(struct s)+100 * sizeof(int));
//	free(w);
//	w = NULL;
//	return 0;
//}

typedef struct stu
{
	int i;
	char* p;
}sl;

int main()
{
	sl* w = (sl*)malloc(sizeof(sl) * 10);
	for (int c = 0; c < 10; c++)
	{
		(w + c)->i = c + 1;
	}
	for (int c = 0; c < 10; c++)
	{
		(w + c)->p = (char*)malloc(sizeof(char) * (c + 1));
	}
	for (int y = 0; y < 10; y++)
	{
		for (int c = 0; c <= y; c++)
		{
			(w + y)->p[c] = 97 + c;
		}
	}
	for (int y = 0; y < 10; y++)
	{
		for (int c = 0; c <= y; c++)
		{
			printf("%c",(w + y)->p[c]);
		}
		printf("\n");
	}
	free(w->p);
	w->p = NULL;
	free(w);
	w = NULL;

}
